﻿using ClientProxies;
using ClientProxies.ArchiveServiceReference;
using Common.Contracts;

namespace ServiceTests
{
  using System;

  using AbstractConfigurationManager;

  using ClientProxies.OneStepServiceReference;

  using FluentAssertions;

  using Moq;

  using NUnit.Framework;

  using ServiceInterfaces;

  using Services;

  [TestFixture]
  public class OneStepServiceTests
  {
    [SetUp]
    public void SetUp()
    {
      _fileService = new Mock<IFileService>();
      _serviceFactory = new Mock<IServiceFactory>();
      IServiceConfig _serviceConfigconfig = new ServiceConfig();
      _oneStepService = new OneStepService(_serviceFactory.Object);
    }

    //private Mock<IConfigurationManager> _configurationManager;
    private Mock<IFileService> _fileService;
    private IOneStepService _oneStepService;
    private Mock<IServiceFactory> _serviceFactory;
      
    [Test]
    public void GivenAValidSyncDate_WhenITryToGetRunDataFromTheFakeOneStepService_IGetFakeOneStepDataFileStatusData()
    {
        _serviceFactory.Setup(x => x.CreateFileServiceClient<IFileService>()).Returns(new FakeFileServiceClient());
        
        var data = _oneStepService.GetFileData(It.IsAny<DateTime>(), It.IsAny<String>());
        data.Should().HaveCount(1);
    }

  }
}
